# -*- mode: org; fill-column: 80; -*-
#+TITLE: Conditionals
#+AUTHOR: Zelphir Kaltstahl
#+STARTUP: content indent align inlineimages entitiesplain nologdone nologreschedule nologredeadline nologrefile
#+TODO: TODO WIP | DONE
#+DATE: <2021-05-08 Sa>
#+LANGUAGE: English
#+PRIORITIES: A C C

* If-then-else

#+begin_src sml :results output verbatim replace drawer
val name = "alice";
val age = 16;

if name = "alice" andalso age >= 12 then
    print ((Int.toString (1 + 2)) ^ "\n")
else
    print ((Int.toString 0) ^ "\n")
#+end_src

#+RESULTS:
:results:
val age = 16 : int
:end:
